<template>
	<view class="header" :style="{'height':paltform == 'ios' ? '180rpx' : '150rpx'}">
		<view class="statusBar" :style="{'height':`${statusBarH}px`}"></view>
		<view class="t-content">
			<!-- <image src="../static/re.png" class="back-btn" alt="" ></image> -->
			<u-icon v-if="showBack" name="arrow-left"  color="#000000" size="28" @click="back()"></u-icon>
			<view v-if="!showBack" class="header-right"></view>
			<view class="title">
				{{title}}
			</view>
			<view class="header-right"></view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"header",
		data() {
			return {
				statusBarH:uni.getSystemInfoSync().statusBarHeight,
				paltform:'ios'
			};
		},
		created() {
			this.paltform = uni.getSystemInfoSync().platform
		},
		props:{
			title:{
				type:String,
				default:()=>{
					return '本地生活服务'
				}
			},
			showBack:{
				type:Boolean,
				default:()=>{
					return false
				}
			}
		},
		methods:{
			back(){
				uni.navigateBack({
					delta:1
				})
			}
		}
	}
</script>

<style scoped>
	.header{
		width: 750rpx;
		height: 180rpx;
		background: #FFFFFF;
		display: flex;
		align-items: center;
		flex-direction: column;
		justify-content: space-between;
    background: #fff;
	}
	.statusBar{
		width: 750rpx;
	}
	.t-content{
		display: flex;
		align-items: center;
		width: 690rpx;
		margin-bottom: 12px;
	}
	.title{
		font-size: 40rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: bold;
		color: #000000;
	}
	.header-right{
	}

</style>
